#!/usr/bin/env gnuplot
#绘制串口接收的数据
#时间是采集得到的时间，

set key
set grid
 

set title "采样值"
set xlabel "时间"
set ylabel "幅值"
#plot \
#    "ad.dat" using 1:2 w lp title "AD数据"
#pause 3

plot \
    "ad.dat" using 1:2 with linespoints linecolor 2 pointtype 1  pointsize 1 title "AD数据",\
    "trig1.dat" using 1:2 with impulses  linecolor 1  title "pos",\
    "trig2.dat" using 1:2 with impulses  linecolor 1  title "pos"
    


#quit
#pause 5 #等待4s
#refresh #刷新，重新绘制 
#reread #读取数据显示
pause 500
exit
